#ifndef SOIL_H
#define SOIL_H

#include <vector>
#include <boost/smart_ptr.hpp>
using boost::scoped_ptr;
using boost::shared_ptr;

#include "GameElement.h"
#include "Man.h"

/*! \class Soil
 *  \brief Captures the soil in the game
 *  \details This class inherits from GameElement.
 *
 *  The grid representation of the soil object is stored in a 2D vector.
 *  The vector element is true or false depending on if it has been explored by dig dug
 *  or not.
 *
 *  \author Jackline Atsango
 *  \author Jean pierre vieira Pereira
 *  \version 3
 *  \date 26 September 2012
 */

using namespace std;

class Soil: public GameElement
{
    public:

/*! \fn Soil
 *  \brief create a soil object
 *  \param dig_dug object from class Man
 */
        Soil(shared_ptr<Man > dig_dug);

/*! \fn void initialise
 *  \brief Sets the starting position and ID of the soil object
 *
 *  The vector storing the boolean status of each 50x50 square is populated with
 *  the starting holes, which are the locations where the monsters will start. .
 */
        void initialise();

/*! \fn void update
 *  \brief Populates the 2D vector
 *
 *  The x and y coordinate that dig dug has explored divided by 50, correspond to the
 *  row and column number of the square. This position is stored in the vector and set to true.
 */
        void update();

/*! \fn bool get_hole_tracker
 *  \brief Check the boolean status of a specific coordinate
 *  \return bool
 */
        bool get_hole_tracker(int col, int row);

    private:

        vector< vector<bool> > _hole_tracker;
        int _hole_tracker_col;
        int _hole_tracker_row;

        shared_ptr<Man > _DigDug;
};

#endif // SOIL_H
